package org.example.client.api;

import org.apache.dubbo.config.annotation.DubboReference;
import org.example.api.RpcApi;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/system")
public class SystemController {

    @DubboReference
    private RpcApi rpcApi;

    @GetMapping("/test")
    public String test() {
        return "ok";
    }

    @GetMapping("/rpc")
    public String rpc() {
        return rpcApi.test("zmj");
    }

}
